/*
 * ListModel.java  0.4.0 / Oct 24, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing.list;

import com.cute4j.swing.events.ListDataListener;

/**
 * List Model.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public interface ListModel {

  /**
   * Returns the size of the list.
   *
   * @return the size of the list
   */
  public int getSize();

  /**
   * Returns the element at the specified index.
   *
   * @param index the element index
   *
   * @return the element at the specified index
   */
  public Object getElementAt(int index);

  /**
   * Adds list data listener.
   *
   * @param l the list data listener
   */
  public void addListDataListener(ListDataListener l);

  /**
   * Removes list data listener.
   *
   * @param l the list data listener
   */
  public void removeListDataListener(ListDataListener l);

}
